Skip to content

Conversation

@leonardomunsa
Copy link

@leonardomunsa leonardomunsa commented Jul 2, 2025

Description by Korbit AI

What change is being made?

Add support for XML body requests in the AbstractRequester by integrating the byjg/xmlutil library, updating content type parsing logic, and introducing a test case for handling XML request bodies.

Why are these changes being made?

These changes are being made to enhance the request handling capabilities of the AbstractRequester by supporting XML payloads, which expands the versatility of the application in processing different content types beyond JSON. This approach utilizes the dependency byjg/xmlutil to parse and manage XML content efficiently without disrupting existing functionality for JSON and multipart form data.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Error Handling Uncaught XML Parsing Errors ▹ view ✅ Fix detected
Functionality XML Validation Result Not Used ▹ view ✅ Fix detected
Design Content type handling not extensible ▹ view ✅ Fix detected
Files scanned
File Path Reviewed
src/AbstractRequester.php

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines 254 to 256
$bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod());
$bodyRequestDef->match($requestBody);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod());
$bodyRequestDef->match($requestBody);
}
// Check if the body is the expected before request
$bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod());
$bodyRequestDef->match($requestBody);

@byjg byjg changed the base branch from master to 5.0 July 2, 2025 21:46
@byjg byjg merged commit 9cfff66 into byjg:5.0 Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants